nand: mxs: fix error handling for mxs_nand_init
authorPeng Fan <[email protected]>
Wed, 27 Jan 2016 02:38:02 +0000 (10:38 +0800)
committerScott Wood <[email protected]>
Fri, 12 Feb 2016 23:10:15 +0000 (17:10 -0600)
commit549d7c0e091de6759deef4202129a57480f6414c
treeb4c6f32e5e35ba08c7ed63515379e457acb8568a
parent9ef2835f26652092a61b0cb0551ef4f36be27946
nand: mxs: fix error handling for mxs_nand_init

Fix error handling for mxs_nand_init.

The original error handling is wrong for err2 and err1.
Should first free desc[x], then free desc.

This patch also correctly handle err3, should use
MXS_DMA_CHANNEL_AHB_APBH_GPMI0 as the check point.

Cc: Stefano Babic <[email protected]>
CC: Fabio Estevam <[email protected]>
Cc: Scott Wood <[email protected]>
Cc: Marek Vasut <[email protected]>
Signed-off-by: Peng Fan <[email protected]>
Reviewed-by: Marek Vasut <[email protected]>
drivers/mtd/nand/mxs_nand.c